package com.ykq.mapper;

import com.ykq.entity.Menu;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author ldh
* @description 针对表【menu】的数据库操作Mapper
* @createDate 2024-10-22 08:40:56
* @Entity com.ykq.entity.Menu
*/
public interface MenuMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Menu record);

    int insertSelective(Menu record);

    Menu selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Menu record);

    int updateByPrimaryKey(Menu record);

    /**
     * 根据员工id查询菜单
     * @param staffId 员工id
     * @return 该员工具有的菜单集合
     */
    List<Menu> selectByStaffId(Integer staffId);

    List<Menu> selectAll();

    List<Integer> selectByRoleId(Integer roleId);

    int deleteByRoleId(Integer roleid);

    void insert01(@Param("roleid") Integer roleid,@Param("mid") Integer key);
}
